#include <iostream>
#include "File.hpp"

using namespace std;

int main()
{
    std::cout.setf(std::ios_base::boolalpha);

    string file_name = "test.txt";
    sh::File file(file_name);
    if (!file.open(sh::OpenModeFlag::ReadWrite))
    {
        cout << "open fail" << endl;
        return 1;
    }
    cout << file.readLine(1024) << endl;
    file.seekInputPosition(-2, std::ios::end);
    cout << file.write("m");
    file.close();

    return 0;
}
